package com.cc.service.impl;

import com.cc.dao.EmployeeDao;
import com.cc.dao.impl.EmployeeDaoImpl;
import com.cc.entity.Employee;
import com.cc.entity.Page;
import com.cc.service.EmployeeService;

import java.util.List;

public class EmployeeServiceImpl implements EmployeeService {
    EmployeeDao employeeDao =new EmployeeDaoImpl();


    @Override
    public Page<Employee> EmployeeList(Page<Employee> page, String empName) {
        return employeeDao.EmployeeList(page,empName);
    }

    @Override
    public boolean det(int id) {
        return employeeDao.det(id)>0;
    }

    @Override
    public boolean upd(Employee employee,int id) {
        return employeeDao.upd(employee,id)>0;
    }

    @Override
    public boolean add(Employee employee) {
        return employeeDao.add(employee)>0;
    }

    @Override
    public Employee editById(int id) {
        return employeeDao.editById(id);
    }
}
